package com.gperp.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.gperp.pojo.AsFunction;
import com.gperp.service.FunctionService;

@Controller
public class FunctionController {
	@Resource
	private FunctionService functionService;
	
	@RequestMapping(value="functionList",method=RequestMethod.GET)
	@CrossOrigin
	@ResponseBody
	public List<AsFunction> functionList(){
		return functionService.queryList();
	}
	
	@RequestMapping(value="functionListByIds",method=RequestMethod.GET)
	@CrossOrigin
	@ResponseBody
	public List<AsFunction> functionListByIds(String ids){
		return functionService.functionListByIds(ids);
	}
}
